package com.sllp.C71S3TsllpShop.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sllp.C71S3TsllpShop.bean.Orders;
import com.sllp.C71S3TsllpShop.bean.OrdersExample;
import com.sllp.C71S3TsllpShop.bean.OrdersExample.Criteria;
import com.sllp.C71S3TsllpShop.bean.User;
import com.sllp.C71S3TsllpShop.biz.OrdersBiz;
import com.sllp.C71S3TsllpShop.dao.OrdersMapper;

@Service
public class OrdersBizImpl implements OrdersBiz {

	@Resource
	private OrdersMapper om;
	//所有订单列表
	public List<Orders> findOrder(User user){
		OrdersExample oe =new OrdersExample();
		Criteria c= oe.createCriteria();
		c.andUserEqualTo(user.getId());
		List<Orders> olist = om.selectByExample(oe);
		return olist;
	}
}
